﻿<UserControl
    x:Class="Launchbar.Shapes.ShapeClose"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    SizeChanged="sizeChanged"
    DataContext="{Binding RelativeSource={x:Static RelativeSource.Self}}">
    <Canvas x:Name="shape" x:FieldModifier="private" Width="16" Height="16">
        <Canvas.LayoutTransform>
            <ScaleTransform x:Name="scaler" x:FieldModifier="private" ScaleX="1" ScaleY="1"/>
        </Canvas.LayoutTransform>
        <!--Hover-->
        <Canvas>
            <Canvas.Style>
                <Style TargetType="{x:Type Canvas}">
                    <Style.Triggers>
                        <DataTrigger Binding="{Binding Path=IsHover}" Value="true">
                            <Setter Property="Visibility" Value="Visible"/>
                        </DataTrigger>
                    </Style.Triggers>
                    <Setter Property="Visibility" Value="Hidden"/>
                </Style>
            </Canvas.Style>
            <Rectangle RadiusX="2.8571429" RadiusY="2.8571429" Width="16" Height="16" Canvas.Left="0" Canvas.Top="0">
                <Rectangle.Fill>
                    <LinearGradientBrush StartPoint="7,0" EndPoint="7,14" ColorInterpolationMode="ScRgbLinearInterpolation" MappingMode="Absolute" SpreadMethod="Pad" Transform="1.1428571,0,0,1.1428571,0,0">
                        <LinearGradientBrush.GradientStops>
                            <GradientStop Color="#FFFF2D2D" Offset="0" />
                            <GradientStop Color="#FF9D1717" Offset="1" />
                        </LinearGradientBrush.GradientStops>
                    </LinearGradientBrush>
                </Rectangle.Fill>
            </Rectangle>
            <Path>
                <Path.Data>
                    <PathGeometry FillRule="Nonzero" Figures="M2.8571429,0.5714286L13.142857,0.5714286C14.409143,0.5714286,15.428571,1.5908571,15.428571,2.8571429L15.428571,4.5714286C15.428571,5.7142857,6.8571429,8,0.5714286,8L0.5714286,2.8571429C0.5714286,1.5908571,1.5908571,0.5714286,2.8571429,0.5714286z" />
                </Path.Data>
                <Path.Fill>
                    <LinearGradientBrush StartPoint="7.0666666,1" EndPoint="7.0666666,6.9999995" ColorInterpolationMode="ScRgbLinearInterpolation" MappingMode="Absolute" SpreadMethod="Pad" Transform="1.2244898,0,0,1.2380953,-0.65306126,-0.6666667">
                        <LinearGradientBrush.GradientStops>
                            <GradientStop Color="#FFFFC6B9" Offset="0" />
                            <GradientStop Color="#FFE35D5D" Offset="1" />
                        </LinearGradientBrush.GradientStops>
                    </LinearGradientBrush>
                </Path.Fill>
            </Path>
            <Rectangle RadiusX="2.8571429" RadiusY="2.8571429" Width="16" Height="8" Canvas.Left="0" Canvas.Top="8">
                <Rectangle.Fill>
                    <LinearGradientBrush StartPoint="7,7" EndPoint="7,14" ColorInterpolationMode="ScRgbLinearInterpolation" MappingMode="Absolute" SpreadMethod="Pad" Transform="1.1428571,0,0,0.57142857,0,8">
                        <LinearGradientBrush.GradientStops>
                            <GradientStop Color="#00D04848" Offset="0" />
                            <GradientStop Color="#FFD14747" Offset="1" />
                        </LinearGradientBrush.GradientStops>
                    </LinearGradientBrush>
                </Rectangle.Fill>
            </Rectangle>
        </Canvas>
        <!--Normal-->
        <Canvas>
            <Canvas.Style>
                <Style TargetType="{x:Type Canvas}">
                    <Style.Triggers>
                        <DataTrigger Binding="{Binding Path=IsHover}" Value="true">
                            <Setter Property="Visibility" Value="Hidden"/>
                        </DataTrigger>
                    </Style.Triggers>
                    <Setter Property="Visibility" Value="Visible"/>
                </Style>
            </Canvas.Style>
            <Rectangle RadiusX="2.8571429" RadiusY="2.8571429" Width="16" Height="16" Canvas.Left="0" Canvas.Top="0">
                <Rectangle.Fill>
                    <LinearGradientBrush StartPoint="7,0" EndPoint="7,14" ColorInterpolationMode="ScRgbLinearInterpolation" MappingMode="Absolute" SpreadMethod="Pad" Transform="1.1428571,0,0,1.1428571,0,0">
                        <LinearGradientBrush.GradientStops>
                            <GradientStop Color="#FFBD1F1F" Offset="0" />
                            <GradientStop Color="#FF8C0000" Offset="1" />
                        </LinearGradientBrush.GradientStops>
                    </LinearGradientBrush>
                </Rectangle.Fill>
            </Rectangle>
            <Path>
                <Path.Data>
                    <PathGeometry FillRule="Nonzero" Figures="M2.8571429,0.5714286L13.142857,0.5714286C14.409143,0.5714286,15.428571,1.5908571,15.428571,2.8571429L15.428571,4.5714286C15.428571,5.7142857,6.8571429,8,0.5714286,8L0.5714286,2.8571429C0.5714286,1.5908571,1.5908571,0.5714286,2.8571429,0.5714286z" />
                </Path.Data>
                <Path.Fill>
                    <LinearGradientBrush StartPoint="7.0666666,1" EndPoint="7.0666666,6.9999995" ColorInterpolationMode="ScRgbLinearInterpolation" MappingMode="Absolute" SpreadMethod="Pad" Transform="1.2244898,0,0,1.2380953,-0.6530613,-0.6666667">
                        <LinearGradientBrush.GradientStops>
                            <GradientStop Color="#FFEB9F95" Offset="0" />
                            <GradientStop Color="#FFD14747" Offset="1" />
                        </LinearGradientBrush.GradientStops>
                    </LinearGradientBrush>
                </Path.Fill>
            </Path>
            <Rectangle RadiusX="2.8571429" RadiusY="2.8571429" Width="16" Height="8" Canvas.Left="0" Canvas.Top="8">
                <Rectangle.Fill>
                    <LinearGradientBrush StartPoint="7,7" EndPoint="7,14" ColorInterpolationMode="ScRgbLinearInterpolation" MappingMode="Absolute" SpreadMethod="Pad" Transform="1.1428571,0,0,0.57142857,0,8">
                        <LinearGradientBrush.GradientStops>
                            <GradientStop Color="#00BD4747" Offset="0" />
                            <GradientStop Color="#FFBD4747" Offset="1" />
                        </LinearGradientBrush.GradientStops>
                    </LinearGradientBrush>
                </Rectangle.Fill>
            </Rectangle>
        </Canvas>
        <!--Base-->
        <Canvas>
            <Path Stroke="#FFFFFFFF" StrokeThickness="2.28571439" StrokeStartLineCap="Square" StrokeEndLineCap="Square" StrokeDashCap="Square" StrokeMiterLimit="4">
                <Path.Data>
                    <PathGeometry FillRule="Nonzero" Figures="M10.857143,5.1428569L5.1428572,10.857143 M5.1428572,5.1428569L10.857143,10.857143" />
                </Path.Data>
            </Path>
        </Canvas>
    </Canvas>
</UserControl>